home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / disk-man / linux-fl.000 / linux-fl / linux-floppies / building-blocks / col3.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1996-04-06  |  920 b   |  34 lines

  1. #!/bin/sh
  2. # ----------------------------------------------------------
  3. # This shell script demonstarates how to use colorization on
  4. # linux console
  5. # ----------------------------------------------------------
  6. # My TERM environment variable is set as "linux" in /etc/pprofile
  7. # Check yours.
  8.  
  9.  
  10. # -------------------- 
  11. # Define colors
  12. # --------------------
  13. COLOR1="\033[0m\033[37;44m"   # normal white  on blue 
  14. COLOR2="\033[1;6m\033[36;44m" # bright cyan on blue 
  15. COLOR3="\033[1;6m\033[31;40m" # bright red on black 
  16. COLOR_RESET="\033[0m" 
  17.  
  18. # echo -ne means: 
  19. #       ||------- Enhanced (allow translations of escape sequences)
  20. #       |-------- No newline 
  21.  
  22. echo -ne $COLOR1
  23. echo "Hello -- COLOR1"
  24. echo -ne $COLOR2 
  25. echo "Hello -- COLOR2"
  26. echo -ne $COLOR3 
  27. echo "Hello -- COLOR3"
  28. echo -ne $COLOR_RESET    
  29. echo This should be black and white now
  30.  
  31. # reset restores all terminal properties and clears the screen
  32. # reset 
  33.  
  34.